/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package binh.packet;

import binh.CCommon;
import we.dispatcher.packet.CSentPacket;
import we.dispatcher.writer.DoubleArrWriterProc;
import we.dispatcher.writer.DoubleWriterProc;
import we.dispatcher.writer.IntWriterProc;

/**
 *
 * @author ADMIN
 */
public class CLoginSentPacket extends CSentPacket
{

    public int error = 0;
    public int userID = 0;
    public int accountID = 0;
    public int avatarID = 0;
    public int so1 = 0;
    public int so2 = 1;
    public int unreadMail = 2;
    public int so3 = 0;
    public double gold = 1000;
    public double[] numGoldBet =
    {
        0, 0, 0
    };
    public String username = "trungdv";
    public String config_version = "2.1";
    public double xu = 45;
    public String realname = "do van trung";
    public int firstLogin = 121;
    public double xuPay = 12;

    public CLoginSentPacket()
    {
        super(CCommon.MT_LOGIN_RESULT);
    }

    @Override
    public void processData()
    {
        addPair(IntWriterProc.processor, error);
        addPair(IntWriterProc.processor, userID);
        addPair(IntWriterProc.processor, accountID);
        addPair(IntWriterProc.processor, avatarID);
        addPair(IntWriterProc.processor, so1);
        addPair(IntWriterProc.processor, so2);
        addPair(IntWriterProc.processor, unreadMail);
        addPair(IntWriterProc.processor, so3);
        addPair(DoubleWriterProc.processor, gold);
        addPair(DoubleArrWriterProc.processor, numGoldBet);
        addPair(CCommonProcessor.UserWriteProc, username);
        addPair(CCommonProcessor.VersionWriteProc, config_version);
        addPair(DoubleWriterProc.processor, xu);
        addPair(CCommonProcessor.UserWriteProc, realname);
        addPair(IntWriterProc.processor, firstLogin);
        addPair(DoubleWriterProc.processor, xuPay);
        processAuto();
    }
}
